import request from '@/utils/request'

// 查询车辆列表
export function carlist(query) {
  return request({
    url: '/system/car/list',
    method: 'get',
    params: query
  })
}
// 新增车辆
export function addCar(data) {
  return request({
    url: '/system/car',
    method: 'post',
    data: data
  })
}
// 编辑车辆
export function editCar(data) {
  return request({
    url: '/system/car',
    method: 'put',
    data: data
  })
}
// 车辆启用/停用
export function changeStatus(query) {
  return request({
    url: '/system/car/changeStatus',
    method: 'put',
    params: query
  })
}
//获取车辆详细信息
export function getCar(id) {
  return request({
    url: '/system/car/' + id,
    method: 'get'
  })
}

// 删除车辆
export function delCar(ids) {
  return request({
    url: '/system/car/' + ids,
    method: 'delete'
  })
}
// 查询车辆分类列表
export function carClassifylist(query) {
  return request({
    url: '/system/classify/page',
    method: 'get',
    params: query
  })
}
// 新增车辆分类
export function addClassify(data) {
  return request({
    url: '/system/classify',
    method: 'post',
    data: data
  })
}
// 删除车辆分类
export function delClassify(ids) {
  return request({
    url: '/system/classify/' + ids,
    method: 'delete'
  })
}

